﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<CourseSystem.Core.Entities.SectionInfo>>" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="table03">
    <tr class="box06">
        <td width="20%" align="center">
            序号
        </td>
        <td width="10%" align="center">
            节
        </td>
        <td width="20%" align="center">
            名称
        </td>
        <td width="50%" align="center">
            操作
        </td>
    </tr>
    <% int i = 1;

       foreach (var item in Model)
       {
           if (i % 2 != 0)
           {%>
    <tr class="box01">
        <%}
           else
           { %>
        <tr class="box02" onmouseover="this.className='bg3'" onmouseout="this.className='bg4'"
            bgcolor="#FFFFFF">
            <%} %>
            <td height="27" align="center">
                <%=i++ %>
            </td>
            <td align="center">
                第<%=NumHelper.GetChineseNum(item.OrderId) %>节
            </td>
            <td align="center">
                <%=item.Name %>
            </td>
            <td align="center">
                <%=Html.ActionLink("编辑","SectionEdit",new{cid=item.ChapterId,id=item.Id}) %>
                <%=Html.ActionLink("编辑案例", "StudyEdit", new { cid = item.Id, ty = 1 })%>
                <%=Html.ActionLink("编辑教师PPT", "StudyEdit", new { cid = item.Id, ty = 2 })%>
                <%=Html.ActionLink("编辑讲授式课件", "StudyEdit", new { cid = item.Id, ty = 3 })%>
                <%=Html.ActionLink("编辑学科进展", "StudyEdit", new { cid = item.Id, ty = 4 })%>
                <%=Html.ActionLink("删除", "SectionDel", new { id = item.Id,cid=item.ChapterId },new{onclick="return confirm('确定删除?');"})%>
            </td>
        </tr>
        <%} %>
</table>
<table width="98%" height="7" border="0" align="center" cellpadding="0" cellspacing="0"
    bordercolor="#FFFFFF">
    <tr>
        <td class="gray12">
            &nbsp;
        </td>
        <td align="right" class="gray12">
            <%=Html.AjaxPager(Model, new PagerOptions() { ContainerTagName = "span", CssClass = "mvcPager", PageIndexParameterName = "pid", ShowMorePagerItems = false, AlwaysShowFirstLastPageNumber = true, }, new AjaxOptions() { UpdateTargetId = "listDiv" })%>
            共<%=Model.TotalItemCount %>条记录，页<%=Model.CurrentPageIndex %>/<%=Model.TotalPageCount %>
        </td>
    </tr>
</table>
